// <copyright>
// Project: sofort.NET
// Date:  2014 - 02 - 04
// Copyright: Karl Haak 2014
// </copyright>
// <author>Karl Haak (www.karlhaak.de)</author>
namespace pay.sofort.Models.Mapping
{
    public class PaySofortStatusNotficationMap : PaySofortBaseMap<PaySofortStatusNotfication>
    {
        public PaySofortStatusNotficationMap()
        {
            // Primary Key
            HasKey(t => t.PaySofortStatusNotificationGuid);

            // Properties
            Property(t => t.transaction_key)
                .IsRequired()
                .HasMaxLength(30);

            Property(t => t.status)
                .HasMaxLength(50);

            Property(t => t.ResponseUrl)
                .IsRequired()
                .HasMaxLength(250);

            // Table & Column Mappings
            ToTable("PaySofortStatusNotfication");
            Property(t => t.PaySofortStatusNotificationGuid).HasColumnName("PaySofortStatusNotificationGuid");
            Property(t => t.transaction_key).HasColumnName("transaction_key");
            Property(t => t.time).HasColumnName("time");
            Property(t => t.status).HasColumnName("status");
            Property(t => t.ResponseUrl).HasColumnName("ResponseUrl");
        }
    }
}